//
//  SRLoginManager.h
//  StoryShow
//
//  Created by CyonLeuMBP on 2017/3/19.
//  Copyright © 2017年 qudiandu.cn. All rights reserved.
//

#import <Foundation/Foundation.h>

#import <TencentOpenAPI/QQApiInterface.h>
#import <TencentOpenAPI/TencentOAuth.h>
#import <ThirdPartyLoginAndShareSDK/WXApi.h>

#import "FZLoginViewController.h"
#import "SRLoginUser.h"
#import "FZBasicURLModel.h"

@interface SRLoginManager : NSObject <WBHttpRequestDelegate, TencentSessionDelegate,WXApiDelegate, TencentLoginDelegate, QQApiInterfaceDelegate, WeiboSDKDelegate>

@property (strong, nonatomic) NSString *loginTip;//提示登录原因
@property (strong, nonatomic) FZBasicURLModel *basicURLModel;


+ (instancetype)sharedManager;

    //刷新上传七牛的token
- (void)updateUserInfoFromNetwork;

    //- (FZLoginUser *)currentUser;
+ (BOOL)handelOpenURL:(NSURL *)url;
- (BOOL)hasLogin;
- (void)logout;
- (void)clear;

- (void)setHoldingPaymentStatus:(BOOL)holding;
- (BOOL)getHoldingPaymentStatus;
- (NSString *)schoolGrade;
- (void)refreshVIPStatus;
/**
 *  第一次启动时强制退出
 */
- (void)forceLogoutByFristLoadApp;

- (void)updateUserInfo:(NSDictionary *)userInfo;
    //修改基本信息，可以修改的，如昵称，年龄等
- (void)modifyUserBasicInfo:(NSDictionary *)userInfo;

- (void)onQQLogin;
- (void)showLoginViewControllerFromViewController:(UIViewController *)fromViewController
                                 showCancelButton:(BOOL)showCancel
                                          success:(FZLoginSuccessBlock)success
                                          failure:(FZLoginFailureBlock)failure
                                           cancel:(FZLoginCancelBlock)cancel;

- (void)showLoginViewControllerFromWindow:(UIWindow *)window
                         showCancelButton:(BOOL)showCancel
                                  success:(FZLoginSuccessBlock)success
                                  failure:(FZLoginFailureBlock)failure
                                   cancel:(FZLoginCancelBlock)cancel;
/**
 *  当前视图是否为登录视图
 */
- (BOOL)currentControllerIsLoginViewController:(UIWindow*)window;
/**
 *  进入登录页面
 *
 *  @param vc 从那个控制器进入登录也页面
 */
- (void)showLoginViewSinceController:(UIViewController *)vc;

- (void)saveLoginSuccessType:(NSString *)typeString;
- (void)queryBasicUrlWithSuccess:(FZSuccessBlock)success failure:(FZFailureBlock)failure;
- (void)uploadJPushRegisterID;


@end

